import { request } from 'network/Request'

export function getHomeData() {
    return request.post('');
}

export function LoginByPhoneAndPwd(UserName, Password) {
    return request({
        methods: 'get',
        url: '/Login/LoginByPhoneAndPwd',
        params: {
            UserName: UserName,
            Password: Password
        }
    });
}
export function GetUsers(uploadSearch) {
    return request({
        method: 'POST',
        url: '/UploadFile/GetUploadInfo',
        data: uploadSearch
    })
}
export function GetDetailInfo(CheckUploadNum) {
    return request({
        method: 'get',
        url: '/UploadFile/GetDetailInfo',
        params: {
            CheckUploadNum: CheckUploadNum
        }
    })
}
export function DelInfoByDetailNum(detailNum) {
    return request({
        method: 'delete',
        url: `/UploadFile/RemoveUploadDetailByDetailNum?detailNum=${detailNum}`,
    })
}
export function AddUPload(uploadSearch) {
    return request({
        method: 'POST',
        url: '/UploadFile/AddUPloadHead',
        data: uploadSearch
    })
}
export function DownFile(checkUploadNum) {
    return request({
        method: 'get',
        url: '/DownloadFile/DownloadFileStream',
        params: {
            checkUploadNum: checkUploadNum
        },
        responseType: 'blob'
    })
}
